package config

import (
	"github.com/micro/go-micro/v2/config/source"
	"strings"
)

type Options struct {
	Path []string
	Sources []source.Source
}

type Option func(o *Options)

func WithSource(src source.Source) Option {
	return func(o *Options) {
		o.Sources = append(o.Sources, src)
	}
}

func WithPath(path string) Option {
	return func(o *Options) {
		o.Path =  strings.Split(path[1:], "/")
	}
}